/*
 * ExtensionFilenameFilter.java
 * 
 * last update: 14.01.2010 by Stefan Saru
 * 
 * author:	?
 *
 * Obs: N/A
 */

package ide;

public class ExtensionFilenameFilter implements java.io.FilenameFilter {
  private String allowedExtension;

  public ExtensionFilenameFilter (String s) {
    allowedExtension = s;     
  }
    
  public boolean accept(java.io.File dir, String name) {
      //return name.substring(name.lastIndexOf("."), name.getLength()).equals(allowedExtension);
      return name.endsWith("." + allowedExtension);
    }
  }
